#!/usr/bin/python


def getReagents(dict,id):
    """
    params: dictionary, itemId
    returns: list of reagents
    """
    return dict[repr(id)]['reagents']
    
def getItemId(dict,name):
    """
    params: dictionary, itemId
    returns: item id
    """
    for k,v in dict.iteritems():
        if v['name'] == name:
            return k
    

